package com.maserb.monitor.service.schoolStudent;

import com.maserb.monitor.entity.schoolStudent.StudentAchieveEntity;
import com.maserb.monitor.entity.schoolStudent.StudentScoreEntity;
import com.maserb.monitor.repository.schoolStudent.StudentScoreRepository;
import com.maserb.monitor.service.base.JpaSpecificationService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


public interface StudentScoreService extends JpaSpecificationService<StudentScoreRepository, StudentScoreRepository, StudentScoreEntity, String> {

    /*Page<SchoolStudentEntity> findAll(Pageable pageable, String name, String orgId, String studentId, String schoolId, String sex);

    List<SchoolStudentEntity> findAll(String name, String orgId, String studentId, String schoolId, String sex);

    Integer countByClass(String classId);

    List<SchoolStudentEntity> findByClazzId(String clazzId);

    List<SchoolStudentEntity> findByParent(SchoolStudentParentEntity parent);*/

    List<StudentScoreEntity> findByAchieve(StudentAchieveEntity achieve);

    List<StudentScoreEntity> findByAchieveOrderByScoreDesc(StudentAchieveEntity achieve);

    Page<StudentScoreEntity> findAllByAchieveId(HttpServletRequest request,String achieveId, Pageable pageable);

    Page<StudentScoreEntity> findAllByUser(Pageable var1,String userId, String name,String studentId,String term,String clazzId);

    void save(StudentScoreEntity entity,String parentId);

    void updateAchieve(String parentId);
}